package com.nmsl.sn.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.nmsl.sn.mapper.SnPrescriptionMedicineMapper;
import com.nmsl.sn.domain.SnPrescriptionMedicine;
import com.nmsl.sn.service.ISnPrescriptionMedicineService;

/**
 * 记录患者处方药品Service业务层处理
 * 
 * @author sn
 * @date 2025-02-21
 */
@Service
public class SnPrescriptionMedicineServiceImpl implements ISnPrescriptionMedicineService 
{
    @Autowired
    private SnPrescriptionMedicineMapper snPrescriptionMedicineMapper;

    /**
     * 查询记录患者处方药品
     * 
     * @param prescriptionMedicineId 记录患者处方药品主键
     * @return 记录患者处方药品
     */
    @Override
    public SnPrescriptionMedicine selectSnPrescriptionMedicineByPrescriptionMedicineId(Long prescriptionMedicineId)
    {
        return snPrescriptionMedicineMapper.selectSnPrescriptionMedicineByPrescriptionMedicineId(prescriptionMedicineId);
    }

    /**
     * 查询记录患者处方药品列表
     * 
     * @param snPrescriptionMedicine 记录患者处方药品
     * @return 记录患者处方药品
     */
    @Override
    public List<SnPrescriptionMedicine> selectSnPrescriptionMedicineList(SnPrescriptionMedicine snPrescriptionMedicine)
    {
        return snPrescriptionMedicineMapper.selectSnPrescriptionMedicineList(snPrescriptionMedicine);
    }

    /**
     * 新增记录患者处方药品
     * 
     * @param snPrescriptionMedicine 记录患者处方药品
     * @return 结果
     */
    @Override
    public int insertSnPrescriptionMedicine(SnPrescriptionMedicine snPrescriptionMedicine)
    {
        return snPrescriptionMedicineMapper.insertSnPrescriptionMedicine(snPrescriptionMedicine);
    }

    /**
     * 修改记录患者处方药品
     * 
     * @param snPrescriptionMedicine 记录患者处方药品
     * @return 结果
     */
    @Override
    public int updateSnPrescriptionMedicine(SnPrescriptionMedicine snPrescriptionMedicine)
    {
        return snPrescriptionMedicineMapper.updateSnPrescriptionMedicine(snPrescriptionMedicine);
    }

    /**
     * 批量删除记录患者处方药品
     * 
     * @param prescriptionMedicineIds 需要删除的记录患者处方药品主键
     * @return 结果
     */
    @Override
    public int deleteSnPrescriptionMedicineByPrescriptionMedicineIds(Long[] prescriptionMedicineIds)
    {
        return snPrescriptionMedicineMapper.deleteSnPrescriptionMedicineByPrescriptionMedicineIds(prescriptionMedicineIds);
    }

    /**
     * 删除记录患者处方药品信息
     * 
     * @param prescriptionMedicineId 记录患者处方药品主键
     * @return 结果
     */
    @Override
    public int deleteSnPrescriptionMedicineByPrescriptionMedicineId(Long prescriptionMedicineId)
    {
        return snPrescriptionMedicineMapper.deleteSnPrescriptionMedicineByPrescriptionMedicineId(prescriptionMedicineId);
    }
}
